﻿package hunterCommonlib.ui {
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import hunterCommonlib.core.HEventManager;
	import hunterCommonlib.core.HApplication;
	
	/**
	* ...
	* @author hunter
	*/
	public class Panel extends MovieClip {
		private var _eventManager:HEventManager;
		public function Panel() {
			super();
			_eventManager = new HEventManager();
			_eventManager.target = this;
		}
		//设置可否接收鼠标事件
		public function setMouseEnabled(bol:Boolean):void {
			mouseEnabled = bol;
			mouseChildren = bol;
		}
		//设置位置
		public function setPos(x:Number, y:Number) {
			this.x = x;
			this.y = y;
		}
		//设置尺寸
		public function setSize(width:Number, height:Number) {
			this.width = width;
			this.height = height;
		}
		//设置缩放
		public function setScale(scaleX:Number, scaleY:Number):void {
			this.scaleX = scaleX;
			this.scaleY = scaleY;
		}
		//设置效果
		public function addEvent(type:String, callback:Function) {
			_eventManager.addEvent(type, callback);
		}
		public function removeEvent(type:String, callback:Function) {
			_eventManager.removeEvent(type, callback);
		}
		public function clearEvent():void {
			_eventManager.clearEvent();
		}
	}
	
}